package com.ngc.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ngc.mall.domain.MessageContentDomain;
import com.ngc.mall.vo.MessageContentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageContentMapper extends BaseMapper<MessageContentDomain> {

    @Select("select m.id, m.send_id,m.create_time,m.notice_type, m.title, m.content,u.nickname as send_name from message_content m left join user u on m.send_id=u.id ORDER BY m.create_time DESC;")
    List<MessageContentVO> findAll();
}
